import { post } from './api';
export interface LoginReq {
  username: string
  password: string
}

export interface LoginResp {
  userId: number
  token: string
  nickname:string
  username:string
  avatar: string
}

export function login<LoginResp>(data: LoginReq) {
  return post<LoginResp>(`/login`,data)
}
